package com.example.mobile2021606145zbq0615;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;

import org.jetbrains.annotations.NotNull;

import java.util.List;

public class UsersRViewAdapter extends RecyclerView.Adapter<UsersRViewAdapter.ViewHolder> {
    private List<Users> list;
    private TextView tvltemId;
    private TextView tvltemName;
    private TextView tvltemAge;
    private TextView tvltemScore;

    public UsersRViewAdapter(List<Users> list) {
        this.list = list;
    }


    @NonNull
    @Override
    public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
        View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_rv_main_user, parent, false);
        return new ViewHolder(view);
    }

    @Override
    public void onBindViewHolder(@NonNull @NotNull UsersRViewAdapter.ViewHolder holder, int position) {
        Users users = list.get(position);


    }

    @Override
    public int getItemCount() {
        return 0;
    }

    private void initView() {
        tvltemId = (TextView) findViewById(R.id.tvltemId);
        tvltemName = (TextView) findViewById(R.id.tvltemName);
        tvltemAge = (TextView) findViewById(R.id.tvltemAge);
        tvltemScore = (TextView) findViewById(R.id.tvltemScore);
    }

    static class ViewHoder extends RecyclerView.ViewHolder {
        public ViewHoder(@NonNull View itemView) {
            super(itemView);
        }
    }

    public class ViewHolder extends RecyclerView.ViewHolder {
        public ViewHolder(@NonNull View itemView) {
            super(itemView);
        }
    }
}
